package com.cg.service.impl;

import com.cg.dao.MeetingroomMapper;
import com.cg.entity.Meetingroom;
import com.cg.service.MeetingroomService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Meetingroom)表服务实现类
 *
 * @author chengong
 * @since 2023-12-18 09:02:52
 */
@Service("meetingroomService")
public class MeetingroomServiceImpl implements MeetingroomService {
    @Resource
    private MeetingroomMapper meetingroomMapper;


    @Override
    public List<Meetingroom> queryMeetingRoomAll() {
        List<Meetingroom> meetingrooms = meetingroomMapper.queryMeetingRoomAll();
        return meetingrooms;
    }

    @Override
    public List<Meetingroom> queryMeetingRoomName() {
        return meetingroomMapper.queryMeetingRoomName();
    }

    @Override
    public Integer insertMeeting(Meetingroom meetingroom) {
        Integer count = 0;
        try {
            count = meetingroomMapper.insertMeeting(meetingroom);
        }catch (Exception e){
            e.printStackTrace();
        }
        return count;
    }
}
